package com.auction.job.web.controller;

import com.yisu.auction.ewf.common.Constants;
import com.yisu.auction.ewf.common.web.JsonResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletResponse;

import static com.yisu.auction.ewf.common.enums.ResponseCode.NO_REQUEST_HANDLER;


/**
 * Created by LKL on 2016/8/20
 */
@Controller
public class NotFoundController {

    @RequestMapping(value="/notFound", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
    @ResponseBody
    public JsonResult noController(HttpServletResponse response) {
        response.setHeader(Constants.REQUEST_RESULT_CODE, "404");
        return new JsonResult(NO_REQUEST_HANDLER.code, NO_REQUEST_HANDLER.msg);
    }
}
